(function(){
    let params= dealUrl(location.href)
    let {productid} = params 
    console.log(productid);

    $.ajax({
        url:'http://chst.vip:1234/api/getinlanddiscount?productid='+Number(productid)
    }).then(res=>{
        res=res.result[Number(productid)];
        console.log(res);
        let html=`
        <h2>${res.productName}</h2>
        <div class="txt">
            <span>${res.productFrom}|${res.productTime} </span>
            <div>chenjin/慢慢买</div>
            <p>${res.productPrice}</p>
        </div>
        <p>${res.productInfo}</p>
        ${res.productImg}
        `
        $('main').append(html)
        $('.comment').append(res.productComment)
    })
})()